import request from '@/utils/request'
import qs from 'qs'

// 渲染
export function getClassifyApi(params) {
  return request({
    url: 'http://localhost:2345/msbd/list',
    method: 'get',
    params,
  })
}

// 获取类别
export function getClassifysApi(params) {
  return request({
    url: 'http://localhost:2345/classify/list',
    method: 'get',
    params,
  })
}

// 新增
export function postMsbdApi(data) {
  return request({
    url: 'http://localhost:2345/msbd/addList',
    method: 'post',
    data:qs.stringify(data)
  })
}

// 删除
export function deleteMsbdApi(id) {
  return request({
    url: 'http://localhost:2345/msbd/delList',
    method: 'get',
    params:{id}
  })
}

// 修改
export function updateMsbdApi(data) {
  return request({
    url: 'http://localhost:2345/msbd/updateList',
    method: 'post',
    data:qs.stringify(data)
  })
}
